<template>
	<v-container>
		<v-card class="pa-5">
      <v-row class="pa-5 display-2">{{$t("message.myfavor")}}</v-row>
      <v-divider></v-divider>
      <v-row v-for="item in userfavors" :key="item">
        <v-col cols=4>
          <v-responsive max-height=200 min-width=50 :aspect-ratio="4/3">
          <v-img  :src="item.id.groupinfo.pic"></v-img>
          </v-responsive>
        </v-col>
        <v-col cols=4>
          <p class="headline">{{item.id.groupinfo.name}}</p>
          <p class="title text-truncate">{{item.id.groupinfo.text}}</p>
        </v-col>
        <v-col cols=4>
          <div class="text-center fill-height pa-8">
          <router-link :to="{name:'group',query:{gid:item.id.groupinfo.gid,index:1}}">
          <v-btn class="text-center fill-height" x-large fab color="primary">
            <v-icon size=64>mdi-play</v-icon>
          </v-btn>
          </router-link>
          </div>
        </v-col>
      </v-row>
		</v-card>
	</v-container>
</template>

<script>
export default {
  data: () => ({
    userfavors:null,
  }),
  methods:{
    
   
	  init(){
		var loginBean = new URLSearchParams();
      loginBean.append("uid", Number(this.$cookies.get("user"))); //你要传给后台的参数值 key/value
      this.$axios({
        method: "post",
        url: "http://47.100.137.177:8080/YimooBP1.0/myshowfavors",
        data: loginBean
      })
        .then(response => {
		  this.userfavors=JSON.parse(response.data);
		  console.log(this.userfavors);
        })
        .catch(function(error) {
          console.log(error);
        });
	  },
  },
  created(){
	  this.init();
  }
}
</script>

<style>
</style>
